<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="DataContract" targetNamespace="http://AdventureWorks/Cinema/Server/DataTransferObjects/DataContract.xsd" elementFormDefault="qualified" xmlns="http://AdventureWorks/Cinema/Server/DataTransferObjects/DataContract.xsd" xmlns:mstns="http://AdventureWorks/Cinema/Server/DataTransferObjects/DataContract.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:clr="http://microsoft.com/wsdl/types/" version="1.0">
  <xs:import schemaLocation="Guid.xsd" namespace="http://microsoft.com/wsdl/types/" />
  <xs:complexType name="User">
    <xs:sequence>
      <xs:element name="LastName" type="xs:string" />
      <xs:element name="FirstNames" type="xs:string" />
      <xs:element name="Street" type="xs:string" />
      <xs:element name="City" type="xs:string" />
      <xs:element name="ZipCode" type="xs:string" />
      <xs:element name="Email" type="xs:string" />
      <xs:element name="Newsletter" type="xs:boolean" />
      <xs:element name="Inactive" type="xs:boolean" />
      <xs:element name="Genres" type="Genre" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="UserAccount" type="xs:string" />
      <xs:element name="Roles" type="Role" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attribute name="Id" type="clr:guid" use="required" />
  </xs:complexType>
  <xs:element name="User" type="User">
  </xs:element>
  <xs:complexType name="BankAccount">
    <xs:sequence>
      <xs:element name="User" type="User" />
    </xs:sequence>
    <xs:attribute name="Id" type="clr:guid" use="required" />
  </xs:complexType>
  <xs:complexType name="Distributor">
    <xs:sequence>
      <xs:element name="Name" type="xs:string" />
    </xs:sequence>
    <xs:attribute name="Id" type="clr:guid" use="required" />
  </xs:complexType>
  <xs:complexType name="Person">
    <xs:sequence>
      <xs:element name="Name" type="xs:string" />
    </xs:sequence>
    <xs:attribute name="Id" type="clr:guid" use="required" />
  </xs:complexType>
  <xs:complexType name="Country">
    <xs:sequence>
      <xs:element name="Name" type="xs:string" />
    </xs:sequence>
    <xs:attribute name="Id" type="clr:guid" use="required" />
  </xs:complexType>
  <xs:complexType name="Genre">
    <xs:sequence>
      <xs:element name="Name" type="xs:string" />
    </xs:sequence>
    <xs:attribute name="Id" type="clr:guid" use="required" />
  </xs:complexType>
  <xs:complexType name="NewsItem">
    <xs:sequence>
      <xs:element name="Subject" type="xs:string" />
      <xs:element name="Text" type="xs:string" />
      <xs:element name="StartDate" type="xs:dateTime" />
      <xs:element name="EndDate" type="xs:dateTime" />
      <xs:element name="Categories" type="NewsCategory" minOccurs="0" maxOccurs="unbounded">
      </xs:element>
    </xs:sequence>
    <xs:attribute name="Id" type="clr:guid" use="required" />
  </xs:complexType>
  <xs:complexType name="ParentalGuidance">
    <xs:sequence>
      <xs:element name="Name" type="xs:string" />
    </xs:sequence>
    <xs:attribute name="Id" type="clr:guid" use="required" />
  </xs:complexType>
  <xs:complexType name="Room">
    <xs:sequence>
      <xs:element name="Name" type="xs:string" />
      <xs:element name="ScreenDiagonal" type="xs:int" />
      <xs:element name="SeatCount" type="xs:int" />
      <xs:element name="Inactive" type="xs:boolean" />
    </xs:sequence>
    <xs:attribute name="Id" type="clr:guid" use="required" />
  </xs:complexType>
  <xs:complexType name="Performance">
    <xs:sequence>
      <xs:element name="Movie" type="Movie" />
      <xs:element name="Date" type="xs:dateTime" />
      <xs:element name="Room" type="Room" />
      <xs:element name="Price" type="xs:decimal" />
    </xs:sequence>
    <xs:attribute name="Id" type="clr:guid" use="required" />
  </xs:complexType>
  <xs:complexType name="Movie">
    <xs:sequence>
      <xs:element name="Title" type="xs:string" />
      <xs:element name="OriginalTitle" type="xs:string" />
      <xs:element name="Country" type="Country" />
      <xs:element name="Year" type="xs:int" />
      <xs:element name="StartDate" type="xs:dateTime" />
      <xs:element name="Description" type="xs:string" />
      <xs:element name="Picture" type="xs:unsignedByte" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="Length" type="xs:int" />
      <xs:element name="ParentalGuidance" type="ParentalGuidance" />
      <xs:element name="Distributor" type="Distributor" />
      <xs:element name="Genres" type="Genre" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="Actors" type="Person" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="Producers" type="Person" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="Directors" type="Person" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="AverageRating" type="xs:float" nillable="true">
      </xs:element>
    </xs:sequence>
    <xs:attribute name="Id" type="clr:guid" use="required" />
  </xs:complexType>
  <xs:complexType name="Ticket">
    <xs:sequence>
      <xs:element name="Performance" type="Performance" />
      <xs:element name="User" type="User" />
      <xs:element name="TicketCode" type="xs:string" />
      <xs:element name="Quantity" type="xs:int" />
      <xs:element name="IsPaid" type="xs:boolean" />
      <xs:element name="IsDispatched" type="xs:boolean" />
    </xs:sequence>
    <xs:attribute name="Id" type="clr:guid" use="required" />
  </xs:complexType>
  <xs:element name="News" type="NewsItem">
  </xs:element>
  <xs:complexType name="Rating">
    <xs:sequence>
      <xs:element name="User" type="User" />
      <xs:element name="Movie" type="Movie" />
      <xs:element name="Value" type="xs:int" />
    </xs:sequence>
    <xs:attribute name="Id" type="clr:guid" use="required" />
  </xs:complexType>
  <xs:element name="Ticket" type="Ticket">
  </xs:element>
  <xs:complexType name="MovieInfo">
    <xs:sequence>
      <xs:element name="Title" type="xs:string" />
      <xs:element name="Length" type="xs:int" />
      <xs:element name="ParentalGuidance" type="ParentalGuidance" />
    </xs:sequence>
    <xs:attribute name="Id" type="clr:guid" use="required" />
  </xs:complexType>
  <xs:complexType name="PerformanceInfo">
    <xs:sequence>
      <xs:element name="Date" type="xs:dateTime" />
      <xs:element name="RoomName" type="xs:string" />
      <xs:element name="MovieInfo" type="MovieInfo">
      </xs:element>
    </xs:sequence>
    <xs:attribute name="Id" type="clr:guid" use="required" />
  </xs:complexType>
  <xs:complexType name="UserInfo">
    <xs:sequence>
      <xs:element name="UserAccount" type="xs:string" />
      <xs:element name="Email" type="xs:string" />
      <xs:element name="FirstNames" type="xs:string" />
      <xs:element name="LastName" type="xs:string" />
    </xs:sequence>
    <xs:attribute name="Id" type="clr:guid" use="required" />
  </xs:complexType>
  <xs:complexType name="NewsCategory">
    <xs:sequence>
      <xs:element name="Number" type="xs:int" />
      <xs:element name="Name" type="xs:string" />
    </xs:sequence>
    <xs:attribute name="Id" type="clr:guid" use="required" />
  </xs:complexType>
  <xs:complexType name="Session">
    <xs:sequence>
      <xs:element name="User" type="User" />
      <xs:element name="IPAddress" type="xs:string" />
      <xs:element name="StartDate" type="xs:dateTime" />
    </xs:sequence>
    <xs:attribute name="Id" type="clr:guid" use="required" />
  </xs:complexType>
  <xs:element name="Session" type="Session">
  </xs:element>
  <xs:element name="Rating" type="Rating">
  </xs:element>
  <xs:complexType name="Role">
    <xs:sequence>
      <xs:element name="Id" type="clr:guid" />
      <xs:element name="Name" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
</xs:schema>